Skip to content

Sequential share-of-remainder imputation for SS sub-components#605

Closed
MaxGhenis wants to merge 1 commit intomainfrom
sequential-ss-shares
Closed

Sequential share-of-remainder imputation for SS sub-components#605
MaxGhenis wants to merge 1 commit intomainfrom
sequential-ss-shares

Conversation

@MaxGhenis
Copy link
Contributor

Summary

  • Replace post-hoc normalization of SS sub-components with sequential share-of-remainder imputation
  • Each stage predicts component / remaining_total (a fraction in [0,1]) via QRF, then multiplies by the remaining dollar amount
  • Order: retirement → survivors → disability → dependents (remainder)
  • Sub-components are guaranteed non-negative and sum to social_security by construction — no normalization or fallback shares needed

How it works

  1. Retirement share = QRF predicts retirement / total_ssretirement = share × total
  2. Survivors share = QRF predicts survivors / (total − retirement)survivors = share × remaining
  3. Disability share = QRF predicts disability / (total − retirement − survivors) → same pattern
  4. Dependents = whatever's left (no QRF needed)

Each QRF conditions on demographics, income, and the running remaining total.

Supersedes #603 (normalize-then-rescale approach).

Test plan

  • 21 tests pass locally (115s)
  • test_subcomponents_sum_to_total — exact sum constraint
  • test_zero_ss_zeroes_all_subcomponents — no leakage
  • test_all_components_non_negative — by construction
  • test_retirement_dominates — >50% share

🤖 Generated with Claude Code

Instead of predicting all 4 SS sub-components in the main QRF batch
and then normalizing them to sum to total social_security, predict
shares of the remaining total sequentially:

  1. retirement_share = retirement / total → retirement = share × total
  2. disability_share = disability / (total − retirement)
  3. survivors_share = survivors / (total − retirement − disability)
  4. dependents = remainder

Each QRF predicts a fraction in [0, 1], so sub-components are
guaranteed non-negative and sum to the total by construction —
no post-hoc normalization or fallback shares needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MaxGhenis MaxGhenis force-pushed the sequential-ss-shares branch from 6c87b1f to 50c5cd9 Compare March 17, 2026 01:30
@MaxGhenis
Copy link
Contributor Author

Superseded by #589 which added reconcile_ss_subcomponents() and QRF imputation for SS sub-components in the CPS-only imputation stage.

@MaxGhenis MaxGhenis closed this Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant